hexo+github打造个人博客系列之Coding Pages去广告

hexo+github打造个人博客系列之Coding Pages去广告

尴尬的广告

大家应该可以看到,在第一次以自定义域名访问Coding Pages时,会有一个跳转广告。是不是很尴尬?经查阅官方说明,得知原因。

银牌会员的 Coding Pages 在访问时默认会先加载 Pages 跳转页,您可选择在网站首页任意位置放置「Hosted by Coding Pages」的文字版或图片版,然后勾选下方的「已放置 Hosted by Coding Pages」选项,通过审核后您的 Pages 将不会显示跳转页。请务必将「Hosted by Coding Pages」持续保留在网站首页,撤掉后跳转页会再次出现。

本来以为这个广告是去不掉了,看到这里我觉得Coding还算人性化。最多就是在首页底部声明一下「Hosted by Coding Pages」,总比每个人第一次一打开你的博客就是广告要舒服。

解决方案

官方已经提供了文字或者图片两种策略。我个人偏向于加文字声明。

1
<p>Hosted by <a href="https://pages.coding.me" style="font-weight: bold">Coding Pages</a></p>

找到footer.swig文件,将这段代码加在自己觉得合适的位置就好,保存一下,看下效果。如果正常渲染了,就部署一下,然后在Coding Pages服务中提交审核申请。

Hosted by Coding Pages 已提交审核,我们会在两个工作日内为您处理。

然后就等待审核结束就OK。


扫一扫下方小程序码或搜索Tusi博客,即刻阅读最新文章!

Tusi博客

# hexo
You forgot to set the qrcode for Alipay. Please set it in _config.yml.
You forgot to set the qrcode for Wechat. Please set it in _config.yml.
You forgot to set the business and currency_code for Paypal. Please set it in _config.yml.
You forgot to set the url Patreon. Please set it in _config.yml.
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×